package com.sghj.config.tryagain;

import org.springframework.http.HttpStatus;

import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR;

/**
 * 自定义重试异常
 * @author ZhongKai
 * @date 2022-06-24 8:32
 */
public class TryAgainException extends RuntimeException{

    private Integer status = INTERNAL_SERVER_ERROR.value();

    public TryAgainException(String msg){
        super(msg);
    }

    public TryAgainException(HttpStatus status,String msg){
        super(msg);
        this.status = status.value();
    }

}
